﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IPC.Communication.Framework.Reflection
{
    [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = false)]
    public class HslMqttApiAttribute : Attribute
    {
        public string ApiTopic
        {
            get;
            set;
        }

        public string Description
        {
            get;
            set;
        }

        public bool PropertyUnfold
        {
            get;
            set;
        }

        public string HttpMethod
        {
            get;
            set;
        }

        public HslMqttApiAttribute(string description)
		{
			this.PropertyUnfold = false;
			this.HttpMethod = "POST";
			this.Description = description;
		}

        public HslMqttApiAttribute(string apiTopic, string description)
		{
			this.PropertyUnfold = false;
			this.HttpMethod = "POST";
			this.ApiTopic = apiTopic;
			this.Description = description;
		}

        public HslMqttApiAttribute()
		{
			this.PropertyUnfold = false;
			this.HttpMethod = "POST";
		}
    }
}
